IDIR=../include
CC=gcc
CFLAGS=-lstdc++ -I$(IDIR)
ODIR=../object
LDIR=../lib
LIBS=-lm

#$(patsubst pattern,replacement,text)
_DEPS=fsck.hxx
DEPS=$(patsubst %,$(IDIR)/%,$(_DEPS))

_OBJ=fsck.o
OBJ=$(patsubst %,$(ODIR)/%,$(_OBJ))

$(ODIR)/%.o: %.cpp $(DEPS)
	$(CC) -c -o $@ $< $(CFLAGS)

fsck: $(OBJ)
	gcc -o $@ $^ $(FLAGS) $(LIBS)

.PHONY:clean
clean:
	rm -f $(ODIR)/*.o *~ core $(IDIR)/*~
